<html>
<head>
<meta charset="UTF-8">
<title>简洁时钟</title>


<style>

#time {
    font-size: 20rem;
    line-height: 20rem;
    font-weight: normal;
    text-align: center;
}

#date {
    font-size: 3rem;
    line-height: 3rem;
    text-align: center;
}
</style>


<script>
     function  getD1(){
         var now=new Date();
         document.getElementById("time").innerHTML = now.toTimeString().substring(0,5);
         document.getElementById("date").innerHTML = now.toLocaleDateString();
     }

     setInterval("getD1();",30000);
</script>
</head>


<body  onload = getD1()>
<div id="time"></div>
<div id="date"></div>


</body>
</html>
